package com.common.www.bean.entity.programme;


import org.springframework.boot.base.jpa.domain.annotations.QueryCacheable;
import org.springframework.boot.base.jpa.domain.entity.NumberIdentityEntity;
import com.common.www.bean.entity.project.Project;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 外部调研项目方案
 *
 * @param
 * @author andyliu
 * @date 5/28/2018 4:23 PM
 * @return
 */
@DynamicUpdate(true)
@DynamicInsert(true)
@Entity
@Getter
@Setter
@QueryCacheable
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Table()
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "外部调研项目方案返回参数")
public class ProjectScheme extends NumberIdentityEntity {
    /**
     * 参与项目
     */
    @JsonIgnoreProperties(value = {""})
    @ManyToOne()
    private Project project;
    /**
     * 序号
     */
    @Column(length = 11)
    private Integer sort;
    /**
     * 方案对应的项目(外部调研项目名)
     */
    @Column(length = 64)
    private String assignProjectName;
    /**
     * 类别
     */
    @Column(length = 64)
    private String category;
    /**
     * 小项
     */
    @Column(length = 64)
    private String minorItems;
    /**
     * 细项
     */
    @Column(length = 128)
    private String detailsTerm;
    /**
     * 细项值
     */
    @Column(length = 128)
    private String detailsContent;
    /**
     * 文件名
     */
    @Column(length = 128)
    private String fileName;

}